import Vue from "vue";
import VueRouter from "vue-router";
import HomePage from "@/views/HomePage.vue" //首页
// import Sort from "@/views/Sort.vue" //分类
import Find from "@/views/Find.vue" //发现
// import Carts from "@/views/Carts.vue" //购物车
// import My from "@/views/My.vue" //我的
import Classify from "../views/Classify.vue";
import Shop from "../views/Shop.vue";

import Num1 from "../components/Kind/Num1.vue";
import Num2 from "../components/Kind/Num2.vue";
import Num3 from "../components/Kind/Num3.vue";
import Num4 from "../components/Kind/Num4.vue";
import Num5 from "../components/Kind/Num5.vue";
import Num6 from "../components/Kind/Num6.vue";
import Num7 from "../components/Kind/Num7.vue";
import Num8 from "../components/Kind/Num7.vue";
import Num9 from "../components/Kind/Num9.vue";
import Num10 from "../components/Kind/Num10.vue";
import Num11 from "../components/Kind/Num11.vue";
import Num12 from "../components/Kind/Num12.vue";


import HomeView from "../views/HomeView.vue";
import My from '../views/My.vue'
Vue.use(VueRouter);

const routes = [
  {
    path: '/',
    name: "home",
    component: HomePage,
    redirect: "/home"
  },
  {
    path: '/home',
    component: HomePage
  },
  {
    path: '/find',
    component: Find,
    redirect: "/find/hudong",
    children: [
      {
        path: 'hudong',
        name: 'hudong',
        component: () => import("@/components/Find/hudong.vue")
      },
      {
        path: 'zixun',
        name: 'zixun',
        component: () => import("@/components/Find/zixun.vue")
      },
      {
        path: 'gonglue',
        name: 'gonglue',
        component: () => import("@/components/Find/gonglue.vue")
      },
      {
        path: 'news',
        name: 'news',
        component: () => import("@/components/Find/news.vue")
      },
      {
        path: 'photo',
        name: 'photo',
        component: () => import("@/components/Find/photo.vue")
      }
    ]
    // path: "/",
    // name: "Classify",
    // component: Classify,
  },
  {
    path: "/classify",
    name: "Classify",
    component: Classify,
    redirect: '/classify/son1',
    children: [
      { path: "son1", component: Num1 },
      { path: "son2", component: Num2 },
      { path: "son3", component: Num3 },
      { path: "son4", component: Num4 },
      { path: "son5", component: Num5 },
      { path: "son6", component: Num6 },
      { path: "son7", component: Num7 },
      { path: "son8", component: Num8 },
      { path: "son9", component: Num9 },
      { path: "son10", component: Num10 },
      { path: "son11", component: Num11 },
      { path: "son12", component: Num12 },
    ]
  },
  {
    name: "My",
    component: My,
  },
  {
    path: "/home",
    name: "home",
    component: HomeView,

  },
  {
    path: "/Shop",
    name: "Shop",
    component: Shop,
  },
];

const router = new VueRouter({
  routes,
});

export default router;
